import VueI18n from "vue-i18n";
import i18n from '@/i18n'

/**
 * 过滤器
 */
export default {
	/*性别*/
	filterSex(val: number) {
		let text: VueI18n.TranslateResult;
		if (val === 0) {
			text = i18n.t('label.female');
		} else if (val === 1) {
			text = i18n.t('label.male');
		} else {
			text = '';
		}
		return text
	},
	/*日期*/
	filterDate(val:string) {
		let text = '';
		if (val) {
			text = val.substring(0, 10);
		}
		return text
	},
}
